var db = require('./../../config/db')
var express = require("express");
var router = express.Router();
 
var ss = router.get("/", function(req,res) {
    // var data = {key: 'value', hello: 'world'};
    // res.end(JSON.stringify(data));
    var options = {
        'sql': 'SELECT * FROM article limit 0, 2',
        'handler': result => {
            res.type('html')
            res.render('./../view/index', {data: result})
        }
    }
    db.execQuery(options);
});


 
module.exports = ss